Release 10.1A: OpenEdge Development:
Web Services


Using WSAViewer

WSAViewer is a basic tool for viewing the SOAP messages between a given source and destination, which you determine at startup. As such, it functions as a “man in the middle” between the client and the Web service. It is useful if you are only interested in viewing the content of the SOAP request and response. The simplicity of this tool makes it handy to use when debugging 4GL Web services for which viewing the well-defined SOAP formats is the primary focus. For more information on this tool, see Chapter 7, " Testing and Debugging Progress 4GL Web Services."

Using WSAViewer with a 4GL client

To use WSAViewer with a 4GL client, you have two options:

The syntax to start the viewer is the same when working with any Web service as it is when working with the OpenEdge Web Services Adapter (WSA):

Syntax
wsaviewer listen-port webservice-host webservice-port 

The listen-port is the port on which WSAViewer listens for SOAP request messages. The webservice-host is the host name of the Web service and the webservice-port is the host port on which the Web service listens for SOAP request messages.

Suppose you enter the following command line to start the viewer to listen on localhost at port 8080 and pass SOAP request messages to the Web service, www.stockvend.com, listening on port 80:

wsaviewer 8080 www.stockvend.com 80 

You might code your 4GL Web service CONNECT( ) method like this:

DEFINE VARIABLE hWS AS HANDLE. 
CREATE SERVER hWS. 
hWS:CONNECT("-WSDL http://www.stockvend.com/application/wsdl/stock.wsdl 
             -Binding StockQuoteObj 
             -SOAPEndpoint http://localhost:8080/application/stockquotes"). 

The CONNECT( ) method still gets the WSDL file directly from www.stockvend.com, but all SOAP messages go through WSAViewer on their way to the Web service and back to the client.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095